﻿
@{
    ViewBag.title = "添加友情链接";
}
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>@ViewBag.title</h5>
            <div class="ibox-tools">
            </div>
        </div>
        <div class="ibox-content">
            @using (Html.BeginForm(null, null, FormMethod.Post, new { id = "addLinkForm", @class = "form-horizontal m-t" }))
            {
                <div class="form-group">
                    <label class="col-sm-3 control-label">友情链接分类：</label>
                    <div class="col-sm-8">
                        <select class="form-control m-b" name="KId" id="KId">
                            @foreach (var m in ViewBag.ListKinds)
                            {
                                <option value="@m.Id">@m.KindName</option>
                            }
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">友情链接标题：</label>
                    <div class="col-sm-8">
                        <input id="Title" name="Title" maxlength="100" type="text" class="form-control" required aria-required="true" placeholder="填写友情链接标题">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">站点地址：</label>
                    <div class="col-sm-8">
                        <input id="LinkURL" name="LinkURL" maxlength="100" type="text" class="form-control" required aria-required="true" placeholder="填写友情链接站点URL地址">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">站点LOGO：</label>
                    <div class="col-sm-8">
                        <div class="input-group">
                            <input id="Logo" name="Logo" maxlength="250" type="text" class="form-control upload-path" placeholder="请输入友情链接站点LOGO地址" value="">
                            <span class="input-group-addon my-upload-span upload-img"></span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label">友情链接介绍：</label>
                    <div class="col-sm-8">
                        <input id="Info" name="Info" maxlength="100" type="text" class="form-control" placeholder="填写友情链接介绍，非必选">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">排序：</label>
                    <div class="col-sm-8">
                        <input id="Sequence" type="number" class="form-control" name="Sequence" value="999" maxlength="20" placeholder="越小排得越前" aria-required="true">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">隐藏友情链接：</label>
                    <div class="col-sm-8">
                        <label class="checkbox-inline i-checks">
                            <input type="checkbox" value="1" name="IsHide" id="IsHide"> 隐藏友情链接（该友情链接不显示）
                        </label>
                    </div>
                </div>

                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-3">
                        <button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> 提交 </button>
                        <button class="btn btn-default" type="button" onclick="closethisdialog();"><i class="fa fa-close"></i> 取消 </button>
                    </div>
                </div>
            }
        </div>
    </div>


</div>
<script>
    $(function () {
        //初始化上传控件
        $(".upload-img").InitUploader({ filesize: "10240", sendurl: "/AdminCP/Upload/DoWebuploaderImage", swf: "/js/webuploader/uploader.swf", filetypes: "gif,jpg,png,bmp,jpeg", notwater: true });
        DoPost("addLinkForm");
    })
</script>
